package com.ifdom.dynamicproxy.dynamicstate;

/**
 * 房东
 * <p>
 * 房东有很多行为：将代理行为定义为统一的接口
 *
 * @Author ifredomvip@gmail.com
 * @Date 2022/9/15 14:30
 * @Version 1.0.0
 * @Description
 **/
public class Landlord implements Rent, Swing {
    private double price = 3000;
    private String name;

    public Landlord(String name) {
        this.name = name;
    }

    @Override
    public void rent() {
        System.out.println(this.name + "要出租房子" + this.price);
    }

    @Override
    public Integer swing(String type) {
        System.out.println(this.name + "会游泳，使用" + type + "的方式");
        return 1;
    }
}
